#include "udpserver.hpp"
#include <memory>
#include <cstdio>

void User(const std::string &proc)
{
    std::cout << "\n\rUsage: " << proc << " serverport[1024+]\n"
              << std::endl;
}

int main(int argc, char *argv[])
{
    if (argc != 2)
    {
        User(argv[0]);
        return 1;
    }
    uint16_t port = stoi(argv[1]);

    std::unique_ptr<udpServer> svr(new udpServer(port));

    svr->Init();
    svr->Run();

    return 0;
}